package cn.jiyun.jobs;

import cn.jiyun.service.StudentService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import redis.clients.jedis.JedisPool;

public class MyJob {
    @Autowired
    private JedisPool jedisPool;

    private Logger logger = Logger.getLogger(MyJob.class);

    @Reference
    private StudentService studentService;

    /**
     *  定时任务，定时删除冗余文件
     */
    public void doJob(){
        logger.info("定时任务开始。。。");
        studentService.doJob();
        logger.info("定时任务结束。。。");
    }
}
